package com.bupt.service.common;

import com.bupt.annotation.MParam;
import com.bupt.basic.BasicNetWork;
import com.bupt.dto.sys.UserDto;
import com.bupt.exception.BaseException;


import javax.servlet.http.HttpServletRequest;

public interface LinkService {


    //添加FIBER链路
     Object addFiberLink(UserDto userDto, String projectId, String fiberName, String code, String sourceId, String targetId,
                         Integer xxsl, String asfs, Double xxsh, long length, int year, int serviceLength, Integer fualtTime, Double aveAttenua) throws BaseException;

     //删除FIBER链路
    Object deleteFiberLink(UserDto userDto,String projectId,String fiberId)throws BaseException;

    //更新FIBER链路
    Object updateFiberLink(UserDto userDto, String projectId, String fiberLinkId, String fiberName, String code,
                           Integer xxsl, long length, int year, int serviceLength, String asfs, Integer fualtTime, Double aveAttenua, Double xxsh)throws BaseException;
    //获取FIBER链路
    Object getFiberLinksList(UserDto userDto,String projectId) throws BaseException;

    //添加wdm链路
   Object addWdmLink(UserDto userDto, String projectId, String linkName, String code, String sourceId,
                     String targetId, long size, long length, int year, String rate
    ) throws BaseException;

   //查询wdm链路
    Object getWdmLinksList(UserDto userDto, String projectId) throws BaseException;

    //更新wdm链路
    Object updateWdmLink(UserDto userDto,String projectId,String linkId, String code, String linkName, int year, long size, String rate, long length) throws BaseException;

    //删除wdm链路
    Object deleteWdmLink(UserDto userDto, String projectId, String linkId) throws BaseException;
    //添加otn链路
    Object addOtnLink(UserDto userDto, String projectId, String linkName, String code, String sourceId, String targetId, int year, String loadOnlayer,String rate, long length) throws BaseException;

    //获取otn链路
    Object getOtnLinksList(UserDto userDto, String projectId)throws BaseException;

    //更新otn链路
    Object updateOtnLink(UserDto userDto, String projectId, String linkId, String code, String linkName, int year, String loadOnlayer, String rate, long length)throws BaseException;

    //删除otn链路
    Object deleteOtnLink(UserDto userDto, String projectId, String linkId) throws BaseException;

    //创建sdh链路
    Object addSdhLink(UserDto userDto, String projectId, String linkName, String code, String sourceId, String targetId, int year, String loadOnlayer, String rate, long length) throws BaseException;

    //获取sdh链路
    Object getSdhLinksList(UserDto userDto, String projectId) throws BaseException;

    //更新sdh链路
    Object updateSdhLink(UserDto userDto, String projectId, String linkId, String code, String linkName, int year, String loadOnlayer, String  rate, long length)throws BaseException;

    //删除sdh链路
    Object deleteSdhLink(UserDto userDto, String projectId, String linkId) throws BaseException;

    public boolean preCheckLinkMsg (UserDto userDto, BasicNetWork netWork, BasicNetWork.BasicLink link, BasicNetWork.LayerEnum layer) throws BaseException;
    //获取承载WDM链路的底层链路信息
    Object getLinksLoadMessageWdm( @MParam("current login user") UserDto UserDto,@MParam("projectId") String projectId,@MParam("链路的ID") String linkId
    )throws BaseException;

    //获取承载OTN链路的底层链路信息
    Object getLinksLoadMessageOtn( @MParam("current login user") UserDto UserDto,@MParam("projectId") String projectId,@MParam("链路的ID") String linkId
                              )throws BaseException;

    //获取承载SDH链路的底层链路信息
    Object getLinksLoadMessageSdh( @MParam("current login user") UserDto UserDto,@MParam("projectId") String projectId,@MParam("链路的ID") String linkId
    )throws BaseException;



    Object updateLoadOnLink(UserDto userDto, String projectId, String linkId, String link1, String link2, String link3, String link4, String link5) throws  BaseException;

    Object modRoute(UserDto userDto, String projectId, String linkId, String route) throws BaseException;
}
